package com.blacksea.authserver.dal.dataobject;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;

import java.util.Date;

/**
 * UserDO
 *
 * @author blacksea3(jxt) 2021/4/11 19:25
 */
@Data
@RequiredArgsConstructor
@TableName(value = "user")
public class UserDO {
    @TableId(value = "id", type = IdType.AUTO)
    Integer id;

    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    Date gmtCreate;

    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
    Date gmtModified;

    @TableField(value = "username")
    @NonNull
    String username;

    @TableField(value = "password")
    @NonNull
    String password;
}
